1. Field of the Invention
The present invention relates to a storage device. In particular, this invention relates to a storage device that is capable of meeting the reliability and a building and writing method thereof.
2. Description of the Related Art
Recently, because technology has been developing rapidly, the requirements of storage devices for a variety of devices has increased. Tape reel drives, floppy disk drives, hard disk drives, and silicon storage devices (such as portable disks, card-reading devices or solid state disks (SSD), est.) have been developed to meet the requirements of storing a great amount of data and easy usage. Silicon storage devices use a storage memory (such as flash memory) as a storage medium. They are small, power-efficient, stable, have excellent anti-shock capabilities, and a fast access speeds. Because they are non-volatile and their design is simple, a lot of equipment in the market integrates with storage devices to increase their functions.
However, after a flash memory has been repeatedly erased, read and written, the flash memory may become worn out. When the number of bad blocks accumulates and surpasses the number of spare blocks, the reliability of the flash memory decreases. At this time, the storage device shows a system error message due to the flash memory being unable to provide enough available space, for example, the storage shows a read-only status.
In order to overcome such a reliability problem, several methods are available. One method is that an expensive and more reliable storage memory (such as an SLC flash) is adopted to slow down the deterioration of the drive. Another is that a wearing-leveling algorithm is used to access the storage memory so that the data can be normally written into the memory blocks. Therefore, the memory blocks of the storage memory can be used in turn to average the usage rate of each memory block and prevent one single memory block from being used more frequently than others and becoming damaged. A further method is that an error correcting code (ECC) in the controller of the storage device is improved to detect errors of transmitted data. When a bit error is detected, the bit error can be automatically corrected to guarantee the transmitting data and increase the reliability of the storage device. Furthermore, parts of the storage memory are divided to form a spare space and are reserved to replace bad blocks of the storage memory. However, the available capacity of the storage device is smaller than its real capacity.
Because the application fields of the storage device are widespread, and include commercial fields, industrial fields, and military fields, and the reliability for each field is different, the firmware on the storage device must be modified for each field by using the above methods. This means that spare space of different capacities has to be reserved for different reliability. The available capacity is subsequently affected.